package com.gagakuai.transport.channel;

import com.gagakuai.utils.DefaultAttributeMap;

/*
 * @description: 抽象通道
 * @author: houhong
 * @create: 2024-03-19 00:03
 */
public abstract class AbstractChannel extends DefaultAttributeMap implements Channel {

    private volatile EventLoop eventLoop;


    private final Channel parent;

    private final DefaultChannelPipeline pipeline;

    protected AbstractChannel(Channel parent) {

        this.parent = parent;

        this.pipeline = newChannelPipeline();
    }

    protected DefaultChannelPipeline newChannelPipeline() {

        return new DefaultChannelPipeline(this);
    }


}
